<template>
	<view>
		<!-- 搜索 -->
		<view class="Search">
			<input class="input" @input="chinput" placeholder="请输入代理人账号" placeholder-style="color:#848484;"/>
			<image class="input-img" @click="searcAgency" src="/static/commonImg/shousuo.png"></image>
		</view>
		<!-- 列表 -->
		<view v-if="dataList && dataList.length>0">
				<view class="trade-records" v-for="(item,index) in dataList" :key="index">
					<view class="trade-flex trade-top">
						<view>代理人账号：<text class="public-black6">{{item.username}}</text></view>
						<view class="trade-number" @click="SetRebate(item.username)">
							<text class="public-black6">返佣信息</text>
							<image class="copy-image" src="/static/commonImg/heiyou.png"></image>
						</view>
					</view>
					<view class="trade-flex trade-top">
						<view>总返佣金额：<text class="public-red">{{item.total_rebate}}</text></view>
					</view>
					<view class="trade-top">创建时间：{{timeString(item.createtime)}}</view>
					<view class="appropriate" @click="Appropriate(item)">划转</view>
				</view>
				<!-- 加载状态提示 -->
				<view v-if="isLoading" class="loading-text">加载中...</view>
				<view v-if="noMoreData" class="no-more-text">没有更多数据了</view>
		</view>
		<EmptyRecord v-else></EmptyRecord>
	</view>
</template>

<script src="./index.js"></script>
<style src="./index.scss" lang="scss"></style>